<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>
<body>
  <input type="text" /><button>发送</button>

  <script>
    var btn = document.querySelector('button')

    btn.onclick = function() {
      var time = 60

      var fn = function() {
        if(time !== 0) {
          btn.disabled = true
          btn.innerText = '还省' + time + '秒'
          time -= 1
        } else {
          clearInterval(timer)
          btn.innerText = '发送'
          btn.disabled = false
        }

      }

      fn()

      var timer = setInterval(fn, 1000)
    }
  </script>
</body>
</html>